home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Sound Cards
/
Programming Sound Cards.iso
/
sound_52
/
sample20.asc
< prev
next >
Wrap
Text File
|
1995-01-01
|
10KB
|
260 lines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Cakewalk ASCII File Format -- Example File ;;;
;;; ;;;
;;; Cakewalk Release 2.0 ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; A semi-colon (;) tells the Asc2Cake interpreter to ignore the rest of
; the line. You may use this feature for comments, as we are here.
;;; The ASCII file format for Release 2.0 corresponds quite closely to
;;; the structure of the native, binary file format.
;;;
;;; The ASCII file is made up of several types of sections. We'll call
;;; these sections "typed records". Each typed record begins with a
;;; a label that defines what type of record it is. A label is of the
;;; form [LABEL], where the brackets indicate a label and the text between
;;; them is the record type. Any line beginning with an opening bracket [
;;; indicates the start of a new record.
;;;
;;; These are the various types:
;;;
;;; [VARS] -- Miscellaneous Cakewalk global variables.
;;; [TRACK] -- Parameters for a single track (as in Track View).
;;; [STREAM] -- Events for a single track.
;;; [METERMAP] -- The meter map.
;;; [TEMPOMAP] -- The tempo map.
;;; [SYSX] -- A System Exclusive bank.
;;; [END] -- End of file marker.
;;;
;;; More than record of type TRACK, STREAM, or SYSX may be in a file.
;;; For instance, there will be a TRACK record for each non-empty track in
;;; the work file.
;;;
;;; There may be only one record each of type VARS, METERMAP, and TEMPOMAP.
;;;
;;; The records do not have to be in any particular order, and your reading
;;; programs should not expect them to be.
;;;
;;; Your reading program should expect to find and ignore record types that
;;; it does not recognize. E.g., if your reader encounters "[FUTURE]", it
;;; should ignore the record by scanning for the next line that begins with
;;; an opening bracket.
;;;
;;; All of the records are optional, except the [END] marker record.
;;; The simplest possible file is one line consisting of "[END]".
;;;
;;; Upper- and lower-case IS significant -- for example in variable names
;;; and section labels. "RewindTime" is not the same as "Rewindtime".
;;;
;;; NOTE: The native .WRK file format has some other record types to hold
;;; other information, including the comments text, the region memory
;;; registers, the track offsets, and others. Presently there are no
;;; ASCII typed records corresponding to these. If you think some would
;;; be useful, let us know, and we'll try to incorporate them in the
;;; next revision.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This is the VARS section. You can set Cakewalk variables
;;; here.
;;;
;;; Any variables you omit will be assigned default values, which
;;; are the same as the defaults Cakewalk itself uses. For instance,
;;; if you omit the Keysig variable, 0 (C) will be used, which is the
;;; default key signature in Cakewalk.
;;;
;;; All the recognized variables are listed below. The data type of the
;;; variable is listed in parentheses in the comments. The types are:
;;;
;;; BYTE - 8 bits, 0..256 or -127..+127
;;; WORD - 16 bits, 0..65535 or -32767..+32767
;;; DWORD - 32 bits, 0..4 billion or -2 billion..+2 billion
;;; BOOL - 8 bits boolean, where 1=TRUE or 0=FALSE
;;;
;;; Whether the value is treated as signed or unsigned depends on the
;;; variable.
;;;
;;; Many languages do not support DWORD data types. Your best bet in
;;; this case may be to treat DWORD's as floating-point variables, which
;;; can handle the DWORD value range (albeit often with a loss of
;;; accuracy due to round-off errors in calculations involving them).
[VARS]
Now=0 ; (DWORD) Now marker time
From=0 ; (DWORD) From marker time
Thru=11930 ; (DWORD) Thru marker time
KeySig=0 ; (BYTE) Key signature (0=C, 1=C#, ... 11=B)
Clock=0 ; (BYTE) Clock Source (0=Internal, 1=MIDI, 2=FSK)
AutoSave=0 ; (BYTE) Autosave (0=disabled, 1..256=minutes)
PlayDelay=0 ; (BYTE) PlayDelay
ZeroCtrls=0 ; (BOOL) Zero continuous controllers?
SendSPP=1 ; (BOOL) Send Song Position Pointer?
SendCont=1 ; (BOOL) Send MIDI Continue?
PatchSearch=0 ; (BOOL) Patch/controller search-back?
AutoStop=0 ; (BOOL) Auto-stop?
StopTime=4294967295 ; (DWORD) Auto-stop time
AutoRewind=0 ; (BOOL) Auto-rewind?
RewindTime=0 ; (DWORD) Auto-rewind time
MetroPlay=0 ; (BOOL) Metronome on during playback?
MetroRecord=1 ; (BOOL) Metronome on during recording?
MetroAccent=0 ; (BOOL) Metronome accents primary beats?
CountIn=1 ; (BYTE) Measures of count-in (0=no count-in)
ThruOn=1 ; (BOOL) MIDI Thru enabled?
AutoRestart=0 ; (BOOL) Auto-restart?
CurTempoOfs=1 ; (BYTE) Which of the 3 tempo offsets is used: 0..2
TempoOfs1=32 ; (BYTE) Fixed-point ratio value of offset 1
TempoOfs2=64 ; (BYTE) " " " " " " 2
TempoOfs3=128 ; (BYTE) " " " " " " 2
; NOTE: The offset ratios are expressed as a numerator in the expression
; n/64. To get a ratio from this number, divide the number by 64. To get
; this number from a ratio, multiply the ratio by 64.
; Examples:
; 32 ==> 32/64 = 0.5
; 63 ==> 63/64 = 0.9
; 64 ==> 64/64 = 1.0
; 128 ==> 128/64 = 2.0
;
PunchEnabled=0 ; (BOOL) Auto-Punch enabled?
PunchInTime=0 ; (DWORD) Punch-in time
PunchOutTime=0 ; (DWORD) Punch-out time
EndAllTime=0 ; (DWORD) Time of latest event (incl. all tracks)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The TRACK record contains information very similar to that found
;;; in the Track View. Each line is like a line of the Track View.
;;;
;;; Each line is of the format:
;;;
;;; <number> "<name1>" "<name2>" <status> <loop> <pitch transp.> \
;;; <vel. transp.> <port> <channel> [*]
;;;
;;; <number> is the number of the track (since you can omit tracks)
;;; <name> is the name enclosed in a pair of double-quotes
;;; <name2> is the secondary name, same format as <name>.
;;; <status> is the active status 1="PLAY", 0="mute"
;;; <loop> is looping status 1=loop, 0=no
;;; <pitch transp.> is the pitch transposition (-127..127)
;;; <vel. transp.> is the velocity transposition (-127..127)
;;; <channel> is the forced MIDI channel, (1..16, or 0 for none forced)
;;; An asterisk (*) is appended if the track is sticky-selected.
;;;
;;; NOTE: Blank names must be denoted by a pair of quotes to mark the field.
[TRACK]
0 "Bass Line" "" 1 0 0 0 0 0 *
[TRACK]
1 "Nugent solo" "" 1 0 0 0 0 0 *
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The STREAM record contains a list of events, in temporal (time) order,
;;; for a single track. The format of each line is similar to that of the
;;; Event View, but the data types are not as "abstracted":
;;;
;;; <chan.> <ticks> <kind> <data1> [[<data2>] <dur>]
;;;
;;; <kind> is a single letter is to denote the event type:
;;; 'N' -- Note
;;; 'K' -- Key (note) pressure/aftertouch
;;; 'M' -- Monophonic (channel) pressure/aftertouch
;;; 'C' -- Controller
;;; 'P' -- Patch/program change
;;; 'W' -- pitch Wheel position
;;; 'X' -- SysX meta-event
;;;
;;; <data1>, <data2>, and <dur> depend on what kind of event it is.
;;; In contrast to the Event View, these are all raw numbers. For instance,
;;; MIDI key numbers are given for note events, rather than the converted
;;; pitch string format of the Event View. The other notable exception
;;; is the pitch wheel event ('W'), whose two bytes are converted to a
;;; single signed number in the Event View. In short, all data fields
;;; are given in raw numbers as defined in the MIDI spec.
;;;
;;; This section must begin with the [STREAM] label, followed by the track
;;; number, the number of events, then finally the events themselves.
;;;
;;; Note that MIDI key numbers, not pitch strings, are used. Times are
;;; in absolute ticks, not measure:beat:tick break-downs.
[STREAM]
;;; The section starts off with two lines of general information:
0 ; track number
8 ; number of events that follow -- MUST be exact!
;
; Here is a C major scale, in quarter-notes (durations=120, and 120 ticks
; equals a quarter-note), on track 1, MIDI channel 1:
;
1 0 N 60 64 120
1 120 N 62 64 120
1 240 N 64 64 120
1 360 N 65 64 120
1 480 N 67 64 120
1 600 N 69 64 120
1 720 N 71 64 120
1 840 N 72 64 120
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; MeterMap
;;;
;;; There must be at least one meter change in the map -- for measure one.
;;; Each change is on its own line. The format of the line is similar to
;;; that of the "View/Meter map" window:
;;;
;;; <measure number> <beats per measure>/<beat value>
;;;
[METERMAP]
;;; The section starts off with a line of general information:
3 ; number of meter changes -- MUST be exact!
;;; Changes themselves:
1 4/4 ; measures are numbered from 1..
10 7/8
20 4/4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; TempoMap
;;;
;;; There must be at least one tempo change in the map -- for tick 0. Each
;;; change is on its own line. The format of the line is similar to that of
;;; the "View/Tempo map" window:
;;;
;;; <time> <tempo>
;;;
[TEMPOMAP]
;;; The section starts off with a line of general information:
3 ; number of tempo changes -- MUST be exact!
;;; Changes themselves:
0 100
480 120
960 100
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; SysX
;;;
;;; <bank number> "<name>" <auto> <length>\n
;;; <data byte>\n
;;; ...
;;; <data byte>\n
;;;
;;; <bank number> is 0..63
;;; <auto> is 1=Yes or 0=No
;;; <length> is 0..65535, and includes the F0 and F7 bytes. MUST be exact!
;;;
;;; The data bytes are one per line.
;;;
[SYSX]
0 "Fake SysX message" 1 2
247
240
[SYSX]
10 "Another Fake SysX message" 0 2
247
240
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; End
;;;
;;; The following typed record must be included at the end of the file:
[END]